package com.cai.oamanager.service.impl;

import com.cai.oamanager.dao.UserDao;
import com.cai.oamanager.entity.Category;
import com.cai.oamanager.entity.People;
import com.cai.oamanager.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @author：蔡松坡
 * @date：2021/1/16 10 : 13
 * @package：com.cai.oamanager.service.impl
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;
    @Override
    public People login(People people) {
        return userDao.login(people);
    }

    @Override
    public List<People> allPeople(String tname,Integer start,Integer size) {
        List<People> people = userDao.allPeople(tname,start, size);
        return people;
    }

    @Override
    public void addPeople(People people) {
        userDao.addPeople(people);
    }

    @Override
    public int getTeacherCount(String tname) {
        return userDao.getTeacherCount(tname);
    }

    @Override
    public int getTeacherCountByLike(String tname) {
        return userDao.getTeacherCountByLike(tname);
    }

    @Override
    public void delete(String id) {
        userDao.delete(id);
    }

    @Override
    public void updateSelf(People people) {
        userDao.updateSelf(people);
    }

    @Override
    public List<People> getTeacherName(String oid) {
        return userDao.getTeacherName(oid);
    }

    @Override
    public List<People> getAllFDY() {
        return userDao.getAllFDY();
    }

}
